﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DTO;
using BLL;
 

namespace Children
{
    public partial class Form_ThongKeKetQua : Form
    {
        public Form_ThongKeKetQua()
        {
            InitializeComponent();
        }
        Lop_BLL LOP = new Lop_BLL();
        private void Form_ThongKeKetQua_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'Data_ThongKeKetQua.DS_KQHTcuaLopTheoThang' table. You can move, or remove it, as needed.

            List<Lop_DTO> dsLop;
            dsLop=LOP.DS_LopThuong();

            cmb_Lop_TKKQ.DataSource = dsLop;
            cmb_Lop_TKKQ.DisplayMember = "Tenlop";
            cmb_Lop_TKKQ.ValueMember= "Malop";
         
            this.reportViewer1.RefreshReport();
        }

        private void btn_TKKQ_Click(object sender, EventArgs e)
        {
            this.DS_KQHTcuaLopTheoThangTableAdapter.Fill(this.Data_ThongKeKetQua.DS_KQHTcuaLopTheoThang, int.Parse(txt_Thang_TKKQ.Text), cmb_Lop_TKKQ.SelectedValue.ToString(), int.Parse(txt_Nam_TKKQ.Text) );
            this.reportViewer1.RefreshReport();
        }
    }
}
